(function($,root){
    $scope = $(document.body);
    function renderInfo(info){       
        var html = '<div class="song-name">'+ info.song +'</div>'+
       '<div class="singer-name">'+ info.singer +'</div>' +
       ' <div class="album-name">'+ info.album +'</div>';

       $scope.find('.song-info').html(html);
    }
    function renderImg(image){
        var img = new Image();
        img.src = image;
        img.onload = function(){
            //高斯模糊背景
            root.blurImg(img,$scope);
            $scope.find('.img-wrapper img').attr('src',image);
        }        
    }

    //喜欢/不喜欢
    function renderIsLike(isLike){
        if(isLike){
            $scope.find(".like-btn").addClass("liking");
        }else{
            $scope.find(".like-btn").removeClass("liking");
        }
    }
    root.render = function(data){
        renderInfo(data);
        renderImg(data.image);
        renderIsLike(data.isLike);
    }
    // function init(){

    // }
    // root.init();
})(window.Zepto,window.player || (window.player = {}));
//通过window.player暴露函数init